package com.ease.platform.model.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.OptionalEnum;

public enum OwnerType implements OptionalEnum {

	User((short) 1, "User"), //

	Role((short) 2, "Role");//

	private short value;

	private String text;

	private OwnerType(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public static OwnerType get(short value) {
		return EnumUtil.get(OwnerType.class, value);
	}

	public static OwnerType get(String name) {
		return EnumUtil.get(OwnerType.class, name);
	}

	public String getText() {
		return this.text;
	}

	public String getName() {
		return name();
	}

	public short getValue() {
		return value;
	}
}
